package com.shard2.web;

import com.shard2.service.TestShardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2021/4/1  18:28
 * 描述:
 */
@RestController
public class TestShardController {

    @Autowired
    private TestShardService testShardService;

    @RequestMapping("add")
    public void test01(){
        testShardService.testInsert();
    }

    @RequestMapping("select/{orderName}")
    public List<Map<String,Object>> test02(@PathVariable String orderName){
       return testShardService.getOrderList(orderName);
    }

    @RequestMapping("item")
    public List<Map<String,Object>> test03(){
       return testShardService.getOrderItemList("");
    }

}
